package gentlesik;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.List;

import javax.sql.DataSource;

import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.orm.ibatis.SqlMapClientTemplate;

public class HelloIbatis {
	public static void main(String[] args) {
		ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("spring.xml");
		SqlMapClientTemplate template = (SqlMapClientTemplate) context.getBean("SqlMapClientTemplate");
		List list = template.queryForList("getProducts");
		for (Object object : list) {
			System.out.println(object);
		}
	}
}
